import http from 'k6/http';
import {sleep} from 'k6';

const BASE_URL = "http://192.168.96.20:1234"

export default function(){
    let url = `${BASE_URL}/manager_dataload/push/robotNotify`;
    const payload = JSON.stringify({
     "companyCode": "08204",
     "title": "哈哈哈哈",
     "message": "有大魔王出世！!!",
     "url": "http://www.baidu.com",
   });
    const params = {headers: {
        'Content-Type' : 'application/json'}};
    http.post(url, payload, params);
    sleep(0.3)
}

export let options = {
    duration: '60s',
    thresholds: {
        "http_req_duration" : ["p(99) < 500"]
    }
};

